//
//  UIColor+Extension.swift
//  Weibo
//
//  Created by Albert Zhu on 16/9/28.
//  Copyright © 2016年 Albert Zhu. All rights reserved.
//

import UIKit

extension UIColor {
    
    /// 返回RGB颜色
    ///
    /// - parameter red:   红色的值(0-255)
    /// - parameter green: 绿色的值(0-255)
    /// - parameter blue:  蓝色的值(0-255)
    /// - parameter alpha: 透明度(默认为1.0)
    ///
    /// - returns: 颜色
    class func az_RGBColor(red: Int, green: Int, blue: Int, alpha: CGFloat = 1.0) -> UIColor {
        return UIColor(red: CGFloat(red%256)/255.0, green: CGFloat(green%256)/255.0, blue: CGFloat(blue%256)/255.0, alpha: alpha)
    }
}
